import os, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from sqlist import SqList

def Delete_k(sq, index, k):
    # Delete k elements from the same position as elements automatically shift forward after each deletion
    for _ in range(k):
        sq.Delete(index)

if __name__ == "__main__":
    # Create sequential list instance
    sq = SqList()
    sq.CreateList([1, 2, 3, 4, 5])
    # Test inversion
    Delete_k(sq, 1, 3)
    print(sq.display())
